<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>展示图片</title>
    <script type="text/javascript" src="/static/jquery/jquery.min.js"></script>
</head>
<body>
<img class="image" src="" width="400" height="300">
<script>
    // 创建 URLSearchParams 对象并传入当前页面的 URL
    const params = new URLSearchParams(window.location.search);
    const fileName = params.get('fileName');
    console.log("fileName:", fileName);
    // 请求到全路径
    $("img").attr("src", "/home/file/download?fileName=" + fileName);
</script>
</body>
</html>